Arch Netflix - Netflix on the desktop through WINE

Modified:Fri Jan 18 22:39:24 PST 2013
Status: hidden
slug:archnetflix

Important

The database path for the archnetflix repository has moved. It is now located at "http://demizerone.com/$repo/community/$arch". Please update the server lines in your pacman.conf as necessary.

This is the un-official repository for Netflix support in Arch Linux, created by Jesus Alvarez (demizer). In this repository you will find two packages, wine-silverlight and netflix-desktop. The i686 and x86_64 architectures are supported.

The wine-silverlight package is wine-git with patches applied to allow Silverlight to function correctly. These patches were authored by Erich Hoover and can be found on his website. These patches were first reported on iheartubuntu.

The netflix-desktop package provides the netflix-desktop command that sets up the environment from which one could watch Netflix. On the first activation of the script, it creates a win32 WINEPREFIX in ~/.netflix-desktop and downloads and installs Firefox and Silverlight. Once the environment is setup, activating the script simply loads Firefox with the browser pointed towards netflix.com.

The source code for both of the packages can be found at archnetflix-github.

For reporting problems, please see the AUR page at netflix-desktop-aur or the announcement.

wine-silverlight and netflix-desktop are LGPL licensed. Firefox is licensed under the Mozilla Public License.

NON-FREE SOFTWARE NOTICE

netflix-desktop downloads and installs Microsoft's Silverlight into a wine prefix directory. By activating netflix-desktop you also agree to the terms of the Silverlight Install License. Silverlight is non-free software and if RMS discovered what you were doing he would likely be very disappointed.

The archnetflix un-official repository

If you are adding my repository to pacman, you will first need to un-install all previously install versions of netflix-desktop.

Next, add the following to /etc/pacman.conf:

[archnetflix]
Server = http://demizerone.com/$repo/community/$arch

Both the database and the packages are signed, so you will have to add my key to pacman's trusted key list.

# pacman-key -r 0EE7A126

verify it using the info below and then sign it with the local master key:

# pacman-key --lsign-key 0EE7A126

next, update your pacman database

# pacman -Syy

and install the netflix script,

# pacman -S netflix-desktop

Notes

  • My key is not signed by any of the master keys, so you will have to self sign it with your local master key. This page is hopefully an attempt to persuade you that it is legit and I mean no harm. Look below on how to verify my key.
  • To read about key management in Arch, see pacman-key and pacman.conf.

My PGP Key

All of my packages and package databases are signed with the following key,

0EE7A126

The short version:

pub   2048R/0EE7A126 2012-10-24
    Key fingerprint = B18A 9C9F 1E4E EAFF 072D  AB9E 5E1A BF24 0EE7 A126
uid                  Jesus Alvarez <jeezusjr@gmail.com>
sub   2048R/DAB97A2B 2012-10-24

and the long version:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.0

mQENBFCHi6oBCADbqiZasgwE//HtfGvyOynXapEP67tNFsKUgFR/XIVi8Io5ehCD88wOpN0O
02u73OjDssTNh+yEN8ItixhxbZQClE7X4AG2/I49PBsPnY2G3zGPa2TB6vt5GStyVOFJjxsX
F3sWcxfaBXSGonc9Qc8MSKmwwyvG5ASjCYYjK60UKoEqRF09DI/fMaOWcGoosNzNUntzuyAw
9anRPZc/Chtmpd0DyQ4MhkGV18BWSsoGJsTeASo+jq98FcTKhUOfzpPccwmrQ+ViX+RIXIc/
6WtnFs1rE0peWio3sgy+JvywT+8z2yrKZ+ovE1BQYgm2hZ4z6t55gdjfpw4uWtV4BsGzABEB
AAG0Ikplc3VzIEFsdmFyZXogPGplZXp1c2pyQGdtYWlsLmNvbT6JATgEEwECACIFAlCHi6oC
GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEF4avyQO56EmiKoH/iPqzt2+OycQ+tXX
Gv2f/21dSEihGzvyXaC+yOwVrtvMamgxTeChnGi8H3gSabmTGyTJT60WsMmVtgUKZ7rqKh6b
KbV1mIU8m/ZrzGJVrDc8JI+MrDmeaCaqTqZby+NeM5QNZ+FQiHX0dogpO3nvr3EvuipeSGu/
KKsCfR9UxK0SwowBbfn6/3t7obO1il+eq6fHOB0+SuM6a9CssTOtPXim43VaDusaDJ13d5+3
Ey/Mxbif5N+RzMgVavkAL5w0Cf4PElqNWA4aGfDxfhUvZ+WUOC+AFGZ/uGHwxdJLaCSx4aEI
8CDj3trZnPit2umi64JHBb3KYLKey0duz/ztgtS5AQ0EUIeLqgEIALZx/agW3opcodJvUF7K
4L1H9xnqw+bVBXIFyDvSCfWxLgS2MDTl/q38o62u4Htngwix8RsLEWqrtFfAi90VAxJ57pQZ
xYZBAyEOoEOOBYJWbNxneHUSCp6+yGQiiyB0kMoCG9JMlcEmv8fwGqqardBR4+ZM2Acf+aLg
xxi+7B3Ey7Vo/2MnzIu5GeUolDSmyDkUA91WdQByEoUWRVcRvQ+gQz/HGInHxPmqRIKFWSbg
k1oBpCD7yJV+MfJAFaXvrEXn6jLKdIzWixIzhbVpt5RA+2wLzuTA/V5OGglNKOCWshkkjQBw
SCOKPnYez/081Quw+1TIY8FuJY/fEv1Z1ZEAEQEAAYkBHwQYAQIACQUCUIeLqgIbDAAKCRBe
Gr8kDuehJh47B/4myliSn3064a+a77wmvxNphuxKkUPU1gYu0aKF5bmT6nD3iOt3WA8pEcXL
aVkA++nquTu2K8vGqZT4qBvcxP5W8s7mjVhP0h9N7VpikiAouRjEFYCVTjdwJbn0junCTjm4
Ixr4fX5L7EgqCrToKbuQhlocwNPy1aJglm2MwDFzOFxK8R8Dx5O7xD/2b0pBdX/KHPqn2ENC
yiKh/uUuykKpwEXVPPijL6nuA7BBacseXTn8ldAHStrhPEKnZ7mPV9j3VjlRHbYblvLGBBQi
R6y3yNGqe7NjgJQW4e0ibvsbkG6PyUP4BLVUY6CGQFPt1p7dX4xioErHqdqPkjLzMvpi
=TUqo
-----END PGP PUBLIC KEY BLOCK-----

How this repository is assembled

This repository is based on Erich Hoover's excellent work on patching WINE to allow Netflix playback within Silverlight. wine-silverlight contains these patches and netflix-desktop is based off of his early script by the same name. netflix-desktop has been modified to fit the Arch ethos.

It is possible to browse archnetflix-github for all source code involved in the creation of this repository.

Here are the steps I use to update this repository and packages:

Check for updates on Erich Hoover's Ubuntu PPA

We currently use wine-compholio - 1.5.21~raring. This package is the wine development release 1.5.21 with his Silverlight patches applied on top.

Updating the PKGBUILD

In the wine-silverlight directory edit PKGBUILD and change the following values:

pkgver=1.5.21
pkgrel=1

We change pkgrel to 1 since it is a new version of wine. Only increment this value if there is a modification to the packaging files.

The pbldr tool will update the hashes for us automatically.

Building the packages

Building the packages requires that the devtools package be installed. This section assumes the host system is of x86_64 architecture.

The pbldr tool builds i686 and x86_64 packages in a clean chroot environment. This method requires 5-10GB of space and some setup time in order to work properly. The size is largely determined by the number of chroots you have. On my system I have four copies and two root copies, totaling 13GB.

Creating the chroot environment

The steps below outline the creation of the of the chroot root copy that a clean chroot is made from using rsync. This root environment is only used as a pristine copy, no packages are installed or built inside the root copy.

You can adjust the variables used by pbldr when working with chroot environments with the config.json configuration file in the project root directory, or you can pass them as arguments to the script.

32bit chroot environment

See Buldinig 32-bit packages on a 64-bit system for more information. While this wiki article can be used as a reference, the pbldr tool expects the directory structure defined in the following code block.

# mkdir -p /opt/chroot/{i686,x86_64}
# setarch i686 mkarchroot -C "/usr/share/devtools/pacman-extra.conf" \
  -M "/usr/share/devtools/makepkg-i686.conf" /opt/chroot/i686 base base-devel sudo

Edit pacman.conf and makepkg.conf and adjust to your desire. Specifically, the packager and host fields.

# vim /opt/chroot/i686/root/etc/makepkg.conf \
  /opt/chroot/i686/root/etc/pacman.conf

It is necessary to periodically perform updates to the chroot root copy, to do this, you will have to chroot into the root copy and perform the update. This same method is used to install new packages in the root copy.

# linux32 arch-chroot /opt/chroot/i686/root /bin/bash
# pacman -Syu
# pacman -S <package>
# exit

64bit chroot environment

The procedure for creating the 64bit chroot root environment is nearly identical to the commands used to create the 32bit chroot environment.

# mkarchroot -C "/usr/share/devtools/pacman-multilib.conf" \
  -M "/usr/share/devtools/makepkg-x86_64.conf" /opt/chroot/x86_64 base \
  multilib-devel sudo

Edit pacman.conf and makepkg.conf and adjust to your desire. Specifically, the packager and host fields.

# vim /opt/chroot/x86_64/root/etc/makepkg.conf /opt/chroot/x86_64/root/etc/pacman.conf

Periodically it is necessary to perform updates to the chroot root copy, to do this, you will have to chroot into the root copy and perform the update. This is the same method used to install new packages in the root copy.

# arch-chroot /opt/chroot/x86_64/root /bin/bash
# pacman -Syu
# pacman -S <package>
# exit

Build the packages

To build all the packages in devsrc, simply use,

# pbldr build -c

To only build wine-silverlight, use

# pbldr -p wine-silverlight build -c

This command will build i686 and x86_64 packages in a clean chroot copy. In this case /opt/chroot/i686/anet32 for 32bit.

The built packages are output to ./stage/wine-silverlight-<version>/*. Inspect them in the usual manner, namcap, pacman -Qi/-Ql, and so on. Once it is determined they are ready to be added to the repository, use the following command:

$ pbldr repo

The packages are added to the repository and now the entire project directory can be rsync'd to a web host for hosting.

Guidelines for working with the archnetflix project

This section is for packaging developers or anyone interested in the way the Netflix packages for Arch Linux are managed. This section will also go into the finer details of the pbldr build tool used to package this project, as well archzfs.