i'd like the release team to consider a freeze exception for ltspfs to fix a segfault in the cdpinger binary. patch attached. i'd also like to add a new team member to Uploaders. i could upload 0.5.3-3 with those changes.
alternately, i could pull 0.5.5-1 from experimental. the diff between upstream 0.5.3 and 0.5.5 is pretty small, containing the segfault fix for cdpinger, and manpages which we are currently shipping in the debian dir(in 0.5.3-2). 0.5.5-1 contains a small change to debian/rules to allow for different udev rules priority on ubuntu (adds a build-dep on lsb-release). ltspfs (0.5.5-1) experimental; urgency=low * new upstream version * sync with ubuntu * conditionally install udev rules at priority 80 on Ubuntu -- Vagrant Cascadian <[EMAIL PROTECTED]> Sun, 19 Oct 2008 11:05:23 -0700 ltspfs (0.5.5-0ubuntu1) intrepid; urgency=low * new upstream version: * Fix a segfault in cdpinger * Remove manpages from packaging as they now are upstream -- Stéphane Graber <[EMAIL PROTECTED]> Fri, 10 Oct 2008 19:34:18 -0400 ltspfs (0.5.3-2ubuntu1) intrepid; urgency=low * Set ltspfs rules to 80 instead of 50. (LP: #273147) -- Stéphane Graber <[EMAIL PROTECTED]> Tue, 07 Oct 2008 13:30:55 -0400 thanks for your consideration! live well, vagrant
=== modified file 'src/cdpinger.c' --- src/cdpinger.c 2008-04-22 17:22:29 +0000 +++ src/cdpinger.c 2008-10-11 00:06:14 +0000 @@ -18,6 +18,8 @@ CDP_CDROM_UMOUNT } CdpMountType; +char *device; + /* * check_cd_status: Switch mounted and unmounted states in the cdrom, and * call out our shell scripts to handle the actual work of plumbing the @@ -25,13 +27,13 @@ */ gboolean -check_cd_status(gpointer device) +check_cd_status() { char dev[BUFSIZ], cmd[BUFSIZ]; int cdrom, status; static CdpMountType last = CDP_CDROM_UMOUNT; - snprintf(dev, sizeof dev, "/dev/%s", (char *)device); + snprintf(dev, sizeof dev, "/dev/%s", device); /* * Try to open the cdrom device. It might not exist, for a usb cdrom, @@ -40,9 +42,11 @@ */ if ((cdrom = open(dev, O_RDONLY|O_NONBLOCK)) < 0) { - snprintf(cmd, sizeof cmd, - "/lib/udev/ltspfs_entry remove %s", (char *)device); - g_spawn_command_line_sync(cmd, NULL, NULL, NULL, NULL); + if (last == CDP_CDROM_MOUNT) { + snprintf(cmd, sizeof cmd, + "/lib/udev/ltspfs_entry remove %s", device); + g_spawn_command_line_sync(cmd, NULL, NULL, NULL, NULL); + } return FALSE; } @@ -61,7 +65,7 @@ if (status < 0) { snprintf(cmd, sizeof cmd, - "/lib/udev/ltspfs_entry remove %s", (char *)device); + "/lib/udev/ltspfs_entry remove %s", device); return g_spawn_command_line_sync(cmd, NULL, NULL, NULL, NULL); return FALSE; } @@ -76,7 +80,7 @@ case CDS_TRAY_OPEN: if (last == CDP_CDROM_MOUNT) { snprintf(cmd, sizeof cmd, - "/lib/udev/ltspfs_entry remove %s", (char *)device); + "/lib/udev/ltspfs_entry remove %s", device); last = CDP_CDROM_UMOUNT; return g_spawn_command_line_sync(cmd, NULL, NULL, NULL, NULL); } @@ -84,7 +88,7 @@ case CDS_DISC_OK: if (last == CDP_CDROM_UMOUNT) { snprintf(cmd, sizeof cmd, - "/lib/udev/ltspfs_entry add %s auto", (char *)device); + "/lib/udev/ltspfs_entry add %s auto", device); last = CDP_CDROM_MOUNT; return g_spawn_command_line_sync(cmd, NULL, NULL, NULL, NULL); } @@ -114,13 +118,17 @@ if (argc != 2) exit(1); + g_type_init(); + + device = argv[1]; + daemon(0,0); loop = g_main_loop_new (NULL, FALSE); /* Add a timeout */ g_timeout_add_full(G_PRIORITY_DEFAULT, POLL_INTERVAL * 1000, - (GSourceFunc)check_cd_status, argv[1], + (GSourceFunc)check_cd_status, NULL, (GDestroyNotify)end_cd_watch); g_main_loop_run(loop);