Package: gkrellm-hdplop Version: 0.9.9-2 Severity: normal Dear Maintainer,
after the recent /run transition, which also finally turned /etc/mtab into a symlink to /proc/mounts, *hdplop (both incarnations) may fail to find a single disk device automatically. This is likely due to the root device now being exposed as mounted on /dev/disk/by-uuid/$UUID whereas the former /etc/mtab as written by mount still contained a device name as taken from /etc/fstab, which in my case could be parsed by *hdplop. It's unclear if this wouldn't have hit other environments earlier depending on their fstab contents, I just assume for now that I'm one of the remaining handful of users of this tool ;) The fundamental issue is of course the rather crude code in devnames.c's device_id_from_name() which tries to manually resolve device symlinks, but cannot possibly work with any symlink except those located directly in /dev - symlinks in subdirectories of /dev will fail. Impact on wmhdplop: Doesn't start except when called explicitely with some "-d /dev/sda" or such option. Impact on gkrellm-hdplop: Starts but is dazed and confused, leaving a black window in gkrellm. Clicking on the black window will then crash gkrellm, as it hits an assertion that the device list cannot be empty. I've prepared a small patch that makes *hdplop work again for me, the patch replaces the broken manual symlink resolving by a simple call to realpath(3), hopefully not breaking other stuff. I refrained from doing any more changes to the code, even though it looks like it needs some love. Upstream seems to have lost interest five years ago, though... So, without much further ado, here's my crude fix: --- devnames.c.orig 2012-01-29 16:06:50.540706883 +0100 +++ devnames.c 2012-01-29 16:04:28.729321785 +0100 @@ -186,9 +186,10 @@ if (lstat(devname,&stat_buf)) { BLAHBLAH(1,perror(devname)); return -1; } if (S_ISLNK(stat_buf.st_mode)) { - char lname[512]; - int n = readlink(devname, lname, 511); lname[n] = 0; - snprintf(devname,512,"/dev/%s",stripdev(lname)); + devname_ = realpath(devname, NULL); + if(!devname_) { BLAHBLAH(1,perror(devname)); return -1; } + strncpy(devname, devname_, 512); devname[511] = 0; + free(devname_); if (stat(devname,&stat_buf)) { BLAHBLAH(1,perror(devname)); return -1; } } if (!S_ISBLK(stat_buf.st_mode)) { Don't look too closely, specifically on the strncpy(3) stuff, but I felt this is still better than abusing snprintf(3) like the original code does some lines above, and as I said, starting to really fix things here looks like a bottomless pit... Thanks, Andre. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 3.1.10 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages gkrellm-hdplop depends on: ii libc6 2.13-24 ii libfreetype6 2.4.8-1 ii libice6 2:1.0.7-2 ii libimlib2 1.4.4-1+b1 ii libsm6 2:1.2.0-2 ii libx11-6 2:1.4.4-4 ii libxext6 2:1.3.0-3 ii zlib1g 1:1.2.3.4.dfsg-3 Versions of packages gkrellm-hdplop recommends: ii hddtemp <none> ii ttf-freefont 20100919-1 gkrellm-hdplop suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org