Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start

2015-07-15 Thread Martin Pitt
Hey Karsten,

Karsten Sperling [2015-07-15 17:21 +1200]:
 Now that I've got it running (and my family can watch on demand TV again
 ;-) I might have a look if I can trace how the flash plugin is interacting
 with HAL and if it's possible to stub out the relevant calls somehow via
 either a fake hal service or client library. I've CCed in Bart Martens in
 case he has any thoughts on this issue? It would be nice if DRM video in
 flashplugin-nonfree would just work for normal users without having to
 install a custom HAL build by hand.

I *think* pretty much the only thing that the DRM plugin wants from
hal is accessing the system's serial number. This is normally only
readable for root for privacy reasons:

  -r 1 root root 4096 Jul 15 06:53 /sys/class/dmi/id/product_serial

But IIRC hal made that public via a property. So it might be enough to
just create a little stub for this, using python-dbusmock or a little
libhal stub which you initialize once with your system serial number.
But this is just a faint memory/conjecture, it might need something
entirely different.

Apparently arch has a stub for this:
https://wiki.archlinux.org/index.php/Flash_DRM_content#Using_the_modified_libhal_stub
but I haven't looked into it at all. (TBH, I'd never trust any
networking-related product which hasn't been updated for a decade and
still requires hal..)

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start

2015-07-14 Thread Michael Biebl
Am 14.07.2015 um 15:10 schrieb Karsten Sperling:
 Thanks for the quick reply. That's unfortunate, as HAL is still required by
 the Adobe Flash plugin for playing DRM-protected video.

Wow, why the heck do they need hal for that which has been removed from
basically every distro out there?


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start

2015-07-14 Thread Karsten Sperling
Thanks for the quick reply. That's unfortunate, as HAL is still required by
the Adobe Flash plugin for playing DRM-protected video.

On Wed, Jul 15, 2015 at 12:42 AM, Michael Biebl bi...@debian.org wrote:

 Am 14.07.2015 um 14:35 schrieb Karsten Sperling:
  Package: hal
  Version: 0.5.14-8
  Severity: normal
 
  Dear Maintainer,
 
  After upgrading from wheezy to jessie, hald fails to start from systemd,
  and also when trying to run it manually for debugging purposes.
 
  The problem seems to be caused by hald running /sbin/udevadm info -r,
  which causes udevadm to output a usage message and fail with exit code 2.
  On wheezy the same command prints /dev and completes without error (on
 a
  different machine).

 Please uninstall and purge the hal/libhal* package. It's no longer
 needed and won't see further updates. It has been removed from the
 Debian archive since Jessie.



 Michael
 --
 Why is it that all of the instruments seeking intelligent life in the
 universe are pointed away from Earth?




Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start

2015-07-14 Thread Michael Biebl
Am 14.07.2015 um 14:35 schrieb Karsten Sperling:
 Package: hal
 Version: 0.5.14-8
 Severity: normal
 
 Dear Maintainer,
 
 After upgrading from wheezy to jessie, hald fails to start from systemd,
 and also when trying to run it manually for debugging purposes.
 
 The problem seems to be caused by hald running /sbin/udevadm info -r,
 which causes udevadm to output a usage message and fail with exit code 2.
 On wheezy the same command prints /dev and completes without error (on a
 different machine).

Please uninstall and purge the hal/libhal* package. It's no longer
needed and won't see further updates. It has been removed from the
Debian archive since Jessie.



Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start

2015-07-14 Thread Karsten Sperling
I don't know what exactly it's actually used for, but it's referenced here
for example:

https://forums.adobe.com/thread/1039743?start=0tstart=0

Essentially, NPAPI Flash will remain at version 11.x with security updates
only, so they won't update it to remove the HAL dependency.
Later versions are PPAPI only and shipped with Chrome only.

I might try building HAL from source and see if I can work around that
udevadm issue.


On Wed, Jul 15, 2015 at 1:12 AM, Michael Biebl bi...@debian.org wrote:

 Am 14.07.2015 um 15:10 schrieb Karsten Sperling:
  Thanks for the quick reply. That's unfortunate, as HAL is still required
 by
  the Adobe Flash plugin for playing DRM-protected video.

 Wow, why the heck do they need hal for that which has been removed from
 basically every distro out there?


 --
 Why is it that all of the instruments seeking intelligent life in the
 universe are pointed away from Earth?




Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start

2015-07-14 Thread Karsten Sperling
Hi Michael,

I've put together a patch that gets hald working on Jessie. udevadm info
-r is no longer supported in udev = 186 because the /dev directory is
hard-coded to /dev from that version onwards. The patch calls udevadm
--version to check for this.

I also had to update debian/hal.dirs to create
/etc/hal/fdi/{preprobe,information} to get hald to start out of the box
(plus I installed the hal-info package from wheezy).

With these packages installed Flash DRM video plays successfully in
Iceweasel via flashplugin-nonfree. This can be tested via an Adobe test
page (instructions on
https://helpx.adobe.com/flash-player/kb/protected-video-content-play.html)

I don't know if it's feasible to add the hal packages back into Jessie for
this use-case (I suspect everybody is happy to be rid of it); is it
possible to deploy these to some sort of backports / contrib / ugly
repository?

Now that I've got it running (and my family can watch on demand TV again
;-) I might have a look if I can trace how the flash plugin is interacting
with HAL and if it's possible to stub out the relevant calls somehow via
either a fake hal service or client library. I've CCed in Bart Martens in
case he has any thoughts on this issue? It would be nice if DRM video in
flashplugin-nonfree would just work for normal users without having to
install a custom HAL build by hand.

Cheers, Karsten


On Wed, Jul 15, 2015 at 1:43 AM, Karsten Sperling kars...@sperling.co.nz
wrote:

 I don't know what exactly it's actually used for, but it's referenced here
 for example:

 https://forums.adobe.com/thread/1039743?start=0tstart=0

 Essentially, NPAPI Flash will remain at version 11.x with security updates
 only, so they won't update it to remove the HAL dependency.
 Later versions are PPAPI only and shipped with Chrome only.

 I might try building HAL from source and see if I can work around that
 udevadm issue.


 On Wed, Jul 15, 2015 at 1:12 AM, Michael Biebl bi...@debian.org wrote:

 Am 14.07.2015 um 15:10 schrieb Karsten Sperling:
  Thanks for the quick reply. That's unfortunate, as HAL is still
 required by
  the Adobe Flash plugin for playing DRM-protected video.

 Wow, why the heck do they need hal for that which has been removed from
 basically every distro out there?


 --
 Why is it that all of the instruments seeking intelligent life in the
 universe are pointed away from Earth?



Description: Handle newer versions of udevadm where the /dev root is hard-coded.
Author: Karsten Sperling kars...@sperling.co.nz
--- a/hald/linux/coldplug.c
+++ b/hald/linux/coldplug.c
@@ -155,33 +155,56 @@
 hal_util_init_sysfs_to_udev_map (void)
 {
 	char *udevdb_export_argv[] = { /sbin/udevadm, info, -e, NULL };
+	char *udevversion_argv[] = { /sbin/udevadm, --version, NULL };
 	char *udevroot_argv[] = { /sbin/udevadm, info, -r, NULL };
 	int udevinfo_exitcode;
+	int udevadm_version;
 	UdevInfo *info = NULL;
 	char *p;
 	int len;
 
 	sysfs_to_udev_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, udev_info_free);
 
-	/* get udevroot */
-	if (g_spawn_sync (/, udevroot_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL,
+	/* get udevadm version */
+	if (g_spawn_sync (/, udevversion_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL,
 			  udevinfo_stdout,
 			  NULL,
 			  udevinfo_exitcode,
 			  NULL) != TRUE) {
-		HAL_ERROR ((Couldn't invoke %s, udevroot_argv[0]));
+		HAL_ERROR ((Couldn't invoke %s, udevversion_argv[0]));
 		goto error;
 	}
 	if (udevinfo_exitcode != 0) {
-		HAL_ERROR ((%s returned %d, udevroot_argv[0], udevinfo_exitcode));
+		HAL_ERROR ((%s returned %d, udevversion_argv[0], udevinfo_exitcode));
 		goto error;
 	}
-
-	g_strlcpy(dev_root, udevinfo_stdout, sizeof(dev_root));
-	p = strchr(dev_root, '\n');
-	if (p != NULL)
-		p[0] = '\0';
+	udevadm_version = (int) g_ascii_strtoull(udevinfo_stdout, NULL, 10);
 	g_free(udevinfo_stdout);
+	HAL_INFO ((udevadm version is %d, udevadm_version));
+
+	/* get udevroot. hard-coded to /dev in udev = 186 */
+	if (udevadm_version = 186) {
+		g_strlcpy(dev_root, /dev, sizeof(dev_root));
+	} else {
+		if (g_spawn_sync (/, udevroot_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL,
+  udevinfo_stdout,
+  NULL,
+  udevinfo_exitcode,
+  NULL) != TRUE) {
+			HAL_ERROR ((Couldn't invoke %s, udevroot_argv[0]));
+			goto error;
+		}
+		if (udevinfo_exitcode != 0) {
+			HAL_ERROR ((%s returned %d, udevroot_argv[0], udevinfo_exitcode));
+			goto error;
+		}
+
+		g_strlcpy(dev_root, udevinfo_stdout, sizeof(dev_root));
+		p = strchr(dev_root, '\n');
+		if (p != NULL)
+			p[0] = '\0';
+		g_free(udevinfo_stdout);
+	}
 	HAL_INFO ((dev_root is %s, dev_root));
 
 	/* get udevdb export */


hal.dirs
Description: Binary data