LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Removal of hal breaks amazon's drm for flash video (https://www.linuxquestions.org/questions/slackware-14/removal-of-hal-breaks-amazons-drm-for-flash-video-4175418058/)

ReaperX7 07-23-2012 02:57 PM

No it's about using common sense and added levels of testing to make sure projects are not just unused, but aren't utilized in ways that are duplicated. However, this is why -current exists, to test things and make sure things work as they should without problems.

Even if a media distributor uses it still in a project, if it's a well circulated project like Adobe Flash, it's technically still being heavily utilized as a dependency.

HAL isn't even duplicated yet by the likes of udev, upower, udisks, etc. which is not only problematic but concerning. Because HAL was deprecated by it's developers, they failed to realize it's subsystems should have been carried over and duplicated by the newer system tools.

This is the problem of removing parts of a system that aren't replaced or haven't be completely phased out. You take something out, and you break it, but have nothing to duplicate it's function, it's broken until the required dependencies can be re-added by some means.

Didier Spaier 07-23-2012 03:17 PM

If I understand well, flash does not need HAL but in case of DRM, see T3Slider's post above.

Other than that I can't but agree with you that "this is why -current exists, to test things and make sure things work as they should without problems."

So IMHO the most constructive thing to do at this point of time is test and alert or warn if something in -current does not work as expected, giving as precise information as possible about the pitfalls.

BCarey 07-23-2012 06:56 PM

Quote:

Originally Posted by T3slider (Post 4736151)
If you're looking to place blame

I'm not looking to place blame, I just would like to be able to stream the video
Quote:

HAL does not belong in a default Slackware installation any longer and if you do need it for this I think it is better added manually...
This was the type of solution I was hoping for. I'm not against hal being removed. I just haven't had time to test it myself yet, and was wondering if anyone had. There seem to be conflicting "opinions" on the other forums as to whether this is possible.

Brian

BCarey 07-23-2012 07:02 PM

Quote:

Originally Posted by Didier Spaier (Post 4736174)
If I understand well, flash does not need HAL but in case of DRM, see T3Slider's post above.

Other than taht I can't but agree with you that "this is why -current exists, to test things and make sure things work as they should without problems."

So IMHO the most constructive thing to do at this point of time is test and alert or warn if something in -current does not work as expected, giving as precise information as possible about the pitfalls.

So the skinny on flash is here. While removing support for Linux is hardly risky for Adobe (we are little fish in a big pond), removing support for Android and Mobile devices suggests that flash is not long for this world.

As to adding hal on top of the non-hal linux systems, I have seen conflicting reports and have not had the time to experiment on my own.

Brian

BCarey 07-25-2012 08:09 PM

So I was unable to build the old hal on current, but installing the 13.37 hal package allowed me to view the Amazon DRM content. I have not noticed (yet?) any problems arising from running hal on -current. So it seems this problem is not (for now).

Brian

ReaperX7 07-25-2012 08:23 PM

13.37 should have the build script in the /source directory. I had to build it also myself for the Flash media issue also. The Build script Patrick left works, but I do believe HAL has a dependency that needs to be resolved before you build it, but I don't remember what it was off hand.

BCarey 07-25-2012 08:32 PM

As I recall the error message was related to not finding videodev.h. Seems to be related to changes in video4linux.

Brian

ReaperX7 07-25-2012 08:34 PM

Yeah it's video4linux. It should be in your kernel-headers unless it was removed.

There are a few patches on the internet you might be able to find that may work with HAL if you build it manually. Google it and see if you have any luck.

BCarey 07-25-2012 08:39 PM

Now there is something called videodev2.h, which apparently is not the same thing.

Brian

ReaperX7 07-25-2012 10:07 PM

If you can try to rebuild HAL for the new system, try this patch:

https://launchpadlibrarian.net/64645...buntu1.debdiff

Not certain it will work (worked for me but I got tons of warnings), but copy the /sources/l/hal directory and all files to your folder and drop the file above into the /patches directory, and edit hal.Slackbuild to add these lines in the patches section:

Code:

# Patch HAL to use videodev2.h rather than videodev.h which is deprecated
# https://launchpadlibrarian.net/64645948/hal_0.5.14-5ubuntu1.debdiff
zcat $CWD/patches/hal_0.5.14-5ubuntu1.debdiff | patch -p1 --verbose || exit 1

It MAY work, but it might not. No support given on this one so you're on your own here.

BCarey 07-27-2012 10:46 AM

The debian patch was problematic to apply, but the one at https://build.opensuse.org/package/v...ect=KDE%3AKDE3 applied fine.

Unfortunately that just moved me on to the next build error involving glib. As long as the old hal solves my problem, I don't have any more time at the moment to spend on getting the build to work on 14.0.

Thanks for the help.

Brian

rinias 09-06-2012 02:03 PM

2 Attachment(s)
Since this is a touch near to my heart (I dunno, I just like my Amazon videos. If I can't use Linux for videos I want legally from a service I pay for, then I'm going to keep Windows around), I was befuddled when 14RC'n' started to give me errors with the streaming video on Amazon. "Adobe Flash Player crashed" was the error, nothing more.

So, I began to suspect hal. Originally, I simply installed the hal-0.5.14 from Slackware64-13.37, and it worked well. So figuring I needed to compile hal for this system, I popped over to my favorite mirror, and downloaded the source files, SlackBuild, patches, etc to build hal. (Note, you want to go to slackware-/slackware64-13.37/source/l/hal and copy the entire directory). As others have mentioned, there are various errors that one runs into.

The video4linux can be resolved by simply making a symlink:
Code:

# ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
Thanks markush! http://www.linuxquestions.org/questi...0/#post4732941

The next thing to overcome are the glib errors. I found this page : https://bugs.freedesktop.org/show_bug.cgi?id=45094#c0 which offers a patch for the issues. I put that file in the appropriate spot in the source and modified the SlackBuild, but to no avail; there were still add-on files referencing glib incorrectly.

So I made a patch myself, merged it with the one mentioned above, edited the SlackBuild and ran it. Success! After installing, a tour of Amazon's instant video confirmed that it was working.

Obviously, this is a messy way to be doing this, and it's probably (surely?) not a 'best practice.' I have no idea if it's secure or not and make no guarantees, but I hope that if you try it, you'll find that it works for you. Also, please go to Amazon and submit feedback! Suggest that they remove the hal requirement because the project is not longer supported, and that they find a different way to stream content. (Also mention that you appreciate their service and that they - somewhat - support Linux!)

Oh! I also thought I should mention that this is all on Slackware64-current using AlienBob's flash package with seamonkey 2.12.

Riri

- Please copy fix_glib-headers.diff.txt to the patches folder in your hal sources. Remove .txt from the end and run gzip fix_glib-headers.diff Something like:
Code:

mv /path/to/fix_glib-headers.diff.txt /path/to/hal/patches/fix_glib-headers.diff
cd /path/to/hal/patches
gzip fix_glib-headers.diff

- Please remove .txt from the end of hal.SlackBuild.txt and replace the hal.SlackBuild in your hal sources with that file. You may need to chmod +x hal.SlackBuild in order to run it. Something like:
Code:

mv /path/to/hal.SlackBuild.txt /path/to/hal/hal.SlackBuild
chmod +x hal.SlackBuild


Woodsman 09-06-2012 02:41 PM

I would not mind seeing hal supported in /extra. Going cold turkey does affect a handful of apps.

I have successfully built hal on Slackware 14 with two patches. The glib patch is similar to the one already posted and I use a patch for video4l:

Code:

commit ae13d96fa2a0612b6000f4b8f6ed9d3564035703
Author: Michael Biebl <biebl@debian.org>
Date:  Sun Apr 10 14:54:53 2011 +0200

    Build hald-probe-video4linux on current kernels again

    The hald-probe-video4linux prober supports both v4l1 and v4l2. Support for v4l1
    has been removed from Linux kernel 2.6.38. Instead of disabling the prober
    altogether, #ifdef the v4l1 parts when building on a newer kernel.

    Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>

diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c
index 7bc13e8..b055720 100644
--- a/hald/linux/probing/probe-video4linux.c
+++ b/hald/linux/probing/probe-video4linux.c
@@ -30,7 +30,9 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/ioctl.h>
+#ifdef HAVE_LINUX_VIDEODEV_H
 #include <linux/videodev.h>
+#endif
 #include <linux/videodev2.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -50,7 +52,9 @@ main (int argc, char *argv[])
        int ret = -1;
        char *udi;
        char *device_file;
+#ifdef HAVE_LINUX_VIDEODEV_H
        struct video_capability v1cap;
+#endif
        struct v4l2_capability v2cap;
        LibHalContext *ctx = NULL;
        LibHalChangeSet *cset;
@@ -107,7 +111,9 @@ main (int argc, char *argv[])
                        LIBHAL_FREE_DBUS_ERROR (&error);
                        libhal_device_add_capability (ctx, udi, "video4linux.radio", &error);
                }
-        } else {
+        }
+#ifdef HAVE_LINUX_VIDEODEV_H
+        else {
                HAL_DEBUG (("ioctl VIDIOC_QUERYCAP failed"));

                if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
@@ -134,6 +140,7 @@ main (int argc, char *argv[])
                        HAL_DEBUG (("ioctl VIDIOCGCAP failed"));
                }
        }
+#endif

        LIBHAL_FREE_DBUS_ERROR (&error);
        libhal_device_commit_changeset (ctx, cset, &error);

Although I built hal on 14, I have not (yet) tested in any meaningful manner. Soon, I hope. :)

Didier Spaier 09-06-2012 03:34 PM

In /extra or in /pasture... ;)

saulgoode 09-06-2012 04:01 PM

Quote:

Originally Posted by Woodsman (Post 4774403)
I would not mind seeing hal supported in /extra. Going cold turkey does affect a handful of apps.

Is there someplace where HAL-dependent applications are being reported?

For what it's worth, the Thoggen DVD ripper program will not compile on -current owing to HAL dependencies.


All times are GMT -5. The time now is 09:59 AM.