bluez4: remove, unused and probably vulnerable

+63 -118
-91
pkgs/os-specific/linux/bluez/bluez5.nix
··· 1 - { stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib, 2 - pythonPackages, readline, libsndfile, udev, libical, 3 - systemd, enableWiimote ? false }: 4 - 5 - assert stdenv.isLinux; 6 - 7 - stdenv.mkDerivation rec { 8 - name = "bluez-5.47"; 9 - 10 - src = fetchurl { 11 - url = "mirror://kernel/linux/bluetooth/${name}.tar.xz"; 12 - sha256 = "1j22hfjz0fp4pgclgz9mfcwjbr4wqgah3gd2qhfg4r6msmybyxfg"; 13 - }; 14 - 15 - pythonPath = with pythonPackages; 16 - [ dbus pygobject2 pygobject3 recursivePthLoader ]; 17 - 18 - buildInputs = 19 - [ pkgconfig dbus glib alsaLib pythonPackages.python pythonPackages.wrapPython 20 - readline libsndfile udev libical 21 - # Disables GStreamer; not clear what it gains us other than a 22 - # zillion extra dependencies. 23 - # gstreamer gst-plugins-base 24 - ]; 25 - 26 - outputs = [ "out" "dev" "test" ]; 27 - 28 - patches = [ ./bluez-5.37-obexd_without_systemd-1.patch ]; 29 - 30 - preConfigure = '' 31 - substituteInPlace tools/hid2hci.rules --replace /sbin/udevadm ${systemd}/bin/udevadm 32 - substituteInPlace tools/hid2hci.rules --replace "hid2hci " "$out/lib/udev/hid2hci " 33 - ''; 34 - 35 - configureFlags = [ 36 - "--localstatedir=/var" 37 - "--enable-library" 38 - "--enable-cups" 39 - "--enable-pie" 40 - "--with-dbusconfdir=$(out)/etc" 41 - "--with-dbussystembusdir=$(out)/share/dbus-1/system-services" 42 - "--with-dbussessionbusdir=$(out)/share/dbus-1/services" 43 - "--with-systemdsystemunitdir=$(out)/etc/systemd/system" 44 - "--with-systemduserunitdir=$(out)/etc/systemd/user" 45 - "--with-udevdir=$(out)/lib/udev" 46 - ] ++ 47 - stdenv.lib.optional enableWiimote [ "--enable-wiimote" ]; 48 - 49 - # Work around `make install' trying to create /var/lib/bluetooth. 50 - installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth"; 51 - 52 - makeFlags = "rulesdir=$(out)/lib/udev/rules.d"; 53 - 54 - # FIXME: Move these into a separate package to prevent Bluez from 55 - # depending on Python etc. 56 - postInstall = '' 57 - mkdir -p $test/test 58 - cp -a test $test 59 - pushd $test/test 60 - for a in \ 61 - simple-agent \ 62 - test-adapter \ 63 - test-device \ 64 - test-thermometer \ 65 - list-devices \ 66 - monitor-bluetooth \ 67 - ; do 68 - ln -s ../test/$a $out/bin/bluez-$a 69 - done 70 - popd 71 - wrapPythonProgramsIn $test/test "$test/test $pythonPath" 72 - 73 - # for bluez4 compatibility for NixOS 74 - mkdir $out/sbin 75 - ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd 76 - ln -s ../libexec/bluetooth/obexd $out/sbin/obexd 77 - 78 - # Add extra configuration 79 - mkdir $out/etc/bluetooth 80 - ln -s /etc/bluetooth/main.conf $out/etc/bluetooth/main.conf 81 - ''; 82 - 83 - enableParallelBuilding = true; 84 - 85 - meta = with stdenv.lib; { 86 - homepage = http://www.bluez.org/; 87 - repositories.git = https://git.kernel.org/pub/scm/bluetooth/bluez.git; 88 - description = "Bluetooth support for Linux"; 89 - platforms = platforms.linux; 90 - }; 91 - }
+62 -24
pkgs/os-specific/linux/bluez/default.nix
··· 1 - { stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, pythonPackages, makeWrapper 2 - , readline, libsndfile }: 1 + { stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib, 2 + pythonPackages, readline, libsndfile, udev, libical, 3 + systemd, enableWiimote ? false }: 3 4 4 5 assert stdenv.isLinux; 5 6 6 - let 7 - inherit (pythonPackages) python; 8 - pythonpath = "${pythonPackages.dbus-python}/lib/${python.libPrefix}/site-packages:" 9 - + "${pythonPackages.pygobject2}/lib/${python.libPrefix}/site-packages"; 10 - in stdenv.mkDerivation rec { 11 - name = "bluez-4.101"; 12 - 7 + stdenv.mkDerivation rec { 8 + name = "bluez-5.47"; 9 + 13 10 src = fetchurl { 14 - url = "mirror://kernel/linux/bluetooth/${name}.tar.gz"; 15 - sha256 = "11vldy255zkmmpj0g0a1m6dy9bzsmyd7vxy02cdfdw79ml888wsr"; 11 + url = "mirror://kernel/linux/bluetooth/${name}.tar.xz"; 12 + sha256 = "1j22hfjz0fp4pgclgz9mfcwjbr4wqgah3gd2qhfg4r6msmybyxfg"; 16 13 }; 14 + 15 + pythonPath = with pythonPackages; 16 + [ dbus pygobject2 pygobject3 recursivePthLoader ]; 17 17 18 18 buildInputs = 19 - [ pkgconfig dbus glib libusb alsaLib python makeWrapper 20 - readline libsndfile 19 + [ pkgconfig dbus glib alsaLib pythonPackages.python pythonPackages.wrapPython 20 + readline libsndfile udev libical 21 21 # Disables GStreamer; not clear what it gains us other than a 22 22 # zillion extra dependencies. 23 - # gstreamer gst-plugins-base 23 + # gstreamer gst-plugins-base 24 24 ]; 25 25 26 + outputs = [ "out" "dev" "test" ]; 27 + 28 + patches = [ ./bluez-5.37-obexd_without_systemd-1.patch ]; 29 + 30 + preConfigure = '' 31 + substituteInPlace tools/hid2hci.rules --replace /sbin/udevadm ${systemd}/bin/udevadm 32 + substituteInPlace tools/hid2hci.rules --replace "hid2hci " "$out/lib/udev/hid2hci " 33 + ''; 34 + 26 35 configureFlags = [ 27 36 "--localstatedir=/var" 37 + "--enable-library" 28 38 "--enable-cups" 29 - "--with-systemdunitdir=$(out)/etc/systemd/system" 30 - ]; 39 + "--enable-pie" 40 + "--with-dbusconfdir=$(out)/etc" 41 + "--with-dbussystembusdir=$(out)/share/dbus-1/system-services" 42 + "--with-dbussessionbusdir=$(out)/share/dbus-1/services" 43 + "--with-systemdsystemunitdir=$(out)/etc/systemd/system" 44 + "--with-systemduserunitdir=$(out)/etc/systemd/user" 45 + "--with-udevdir=$(out)/lib/udev" 46 + ] ++ 47 + stdenv.lib.optional enableWiimote [ "--enable-wiimote" ]; 31 48 32 49 # Work around `make install' trying to create /var/lib/bluetooth. 33 50 installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth"; 34 51 35 52 makeFlags = "rulesdir=$(out)/lib/udev/rules.d"; 36 53 37 - /* !!! Move these into a separate package to prevent Bluez from 38 - depending on Python etc. */ 54 + # FIXME: Move these into a separate package to prevent Bluez from 55 + # depending on Python etc. 39 56 postInstall = '' 40 - pushd test 41 - for a in simple-agent test-adapter test-device test-input; do 42 - cp $a $out/bin/bluez-$a 43 - wrapProgram $out/bin/bluez-$a --prefix PYTHONPATH : ${pythonpath} 57 + mkdir -p $test/test 58 + cp -a test $test 59 + pushd $test/test 60 + for a in \ 61 + simple-agent \ 62 + test-adapter \ 63 + test-device \ 64 + test-thermometer \ 65 + list-devices \ 66 + monitor-bluetooth \ 67 + ; do 68 + ln -s ../test/$a $out/bin/bluez-$a 44 69 done 45 70 popd 71 + wrapPythonProgramsIn $test/test "$test/test $pythonPath" 72 + 73 + # for bluez4 compatibility for NixOS 74 + mkdir $out/sbin 75 + ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd 76 + ln -s ../libexec/bluetooth/obexd $out/sbin/obexd 77 + 78 + # Add extra configuration 79 + mkdir $out/etc/bluetooth 80 + ln -s /etc/bluetooth/main.conf $out/etc/bluetooth/main.conf 46 81 ''; 47 82 48 - meta = { 83 + enableParallelBuilding = true; 84 + 85 + meta = with stdenv.lib; { 49 86 homepage = http://www.bluez.org/; 87 + repositories.git = https://git.kernel.org/pub/scm/bluetooth/bluez.git; 50 88 description = "Bluetooth support for Linux"; 51 - platforms = stdenv.lib.platforms.linux; 89 + platforms = platforms.linux; 52 90 }; 53 91 }
+1 -3
pkgs/top-level/all-packages.nix
··· 11924 11924 11925 11925 blktrace = callPackage ../os-specific/linux/blktrace { }; 11926 11926 11927 - bluez5 = callPackage ../os-specific/linux/bluez/bluez5.nix { }; 11928 - 11929 - bluez4 = callPackage ../os-specific/linux/bluez { }; 11927 + bluez5 = callPackage ../os-specific/linux/bluez { }; 11930 11928 11931 11929 # Needed for LibreOffice 11932 11930 bluez5_28 = lowPrio (callPackage ../os-specific/linux/bluez/bluez5_28.nix { });